package com.zx.framework.plat.role.po;

import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 * RoleModuleId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class RoleModuleId  implements java.io.Serializable {


    // Fields    

     private String roleId;
     private String moduleId;


    // Constructors

    /** default constructor */
    public RoleModuleId() {
    }

    
    /** full constructor */
    public RoleModuleId(String roleId, String moduleId) {
        this.roleId = roleId;
        this.moduleId = moduleId;
    }

   
    // Property accessors

    @Column(name="ROLEID", nullable=false, length=64)

    public String getRoleId() {
        return this.roleId;
    }
    
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    @Column(name="MODULEID", nullable=false, length=64)

    public String getModuleId() {
        return this.moduleId;
    }
    
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof RoleModuleId) ) return false;
		 RoleModuleId castOther = ( RoleModuleId ) other; 
         
		 return ( (this.getRoleId()==castOther.getRoleId()) || ( this.getRoleId()!=null && castOther.getRoleId()!=null && this.getRoleId().equals(castOther.getRoleId()) ) )
 && ( (this.getModuleId()==castOther.getModuleId()) || ( this.getModuleId()!=null && castOther.getModuleId()!=null && this.getModuleId().equals(castOther.getModuleId()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getRoleId() == null ? 0 : this.getRoleId().hashCode() );
         result = 37 * result + ( getModuleId() == null ? 0 : this.getModuleId().hashCode() );
         return result;
   }   





}